package com.bangda.crm.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.bangda.crm.domain.vo.CrmStockMoveVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 库存对象 crm_stock
 * 
 * @author fanboshi
 * @date 2023-10-24
 */
public class CrmStock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 库存id */
    private Long stockId;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String stockName;

    /** 库存数量（单位kg） */
    @Excel(name = "库存数量", readConverterExp = "单=位kg")
    private BigDecimal stockSum;

    /** 最近变动日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近变动日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stockDateChanged;

    public void setStockId(Long stockId) 
    {
        this.stockId = stockId;
    }

    public Long getStockId() 
    {
        return stockId;
    }
    public void setStockName(String stockName) 
    {
        this.stockName = stockName;
    }

    public String getStockName() 
    {
        return stockName;
    }
    public void setStockSum(BigDecimal stockSum) 
    {
        this.stockSum = stockSum;
    }

    public BigDecimal getStockSum() 
    {
        return stockSum;
    }
    public void setStockDateChanged(Date stockDateChanged) 
    {
        this.stockDateChanged = stockDateChanged;
    }

    public Date getStockDateChanged() 
    {
        return stockDateChanged;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("stockId", getStockId())
            .append("stockName", getStockName())
            .append("stockSum", getStockSum())
            .append("stockDateChanged", getStockDateChanged())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
    public static void copyProperties(CrmStockMoveVo source, CrmStock target) {
        target.setStockId(source.getStockId());
        target.setStockName(source.getStockName());
        target.setStockSum(source.getStockSum());
    }
}
